﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="jh_myplan.aspx.cs" Inherits="rc_jh_myplan" validateRequest="false"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>我的计划</title>
<link href="../css/link.css" rel="stylesheet" type="text/css"/>
<style type="text/css"> 

div.RoundedCorner{background: #5AAE18} 
b.rtop, b.rbottom{display:block;background: #FFF} 
b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #5AAE18} 
b.r1{margin: 0 4px} 
b.r2{margin: 0 3px} 
b.r3{margin: 0 2px} 
b.rtop b.r4, {margin: 0 1px;height: 1px}
.style1 {
	font-size: 13px;
	color: #FFFFFF;
font-weight: bold;
} 
</style>
<style type="text/css">
<!--
.style15 {color: #000000}
.style16 {
	color: #FFFFFF;
	font-size: 13px;
}
.style17 {font-size: 12px}
.style20 {font-size: 14px}
.style21 {
	color: #5AAE18;
	font-weight: bold;
}
.style22 {color: #5AAE18}
body {
	margin-top: 0px;
}
-->
</style>
<script language="javascript" type="text/javascript">
// <!CDATA[

function submit1_onclick() {
    var x = document.getElementById("form2");
    var cmd = document.getElementById("cmd").value;
    x.action="rc_selectlike.aspx?cmd="+cmd;
    document.myform.submit();
}

// ]]>
</script>
</head>

<body>
<!--download from 51aspx.com(５１aｓｐｘ．ｃｏｍ)-->

<div align="center">
    <%
                COM.OA.Entity.users loginuser =Session["loginuser"] as COM.OA.Entity.users;
                
                if (loginuser == null)
                {
                    Response.Write("<script language='javascript'>parent.document.location.href='../login.aspx'</script>");
                    return;
                }
                int userid = loginuser.u_id;
                //设置where语句
                String where = "to_u_id='{0}' and to_state='{1}'";
                where = string.Format(where, userid,1);
                //查询
                System.Collections.Generic.IList<COM.OA.Entity.timeorder> doclist = COM.OA.BLL.timeorderBLL.Select(where,true,false);
                
    %>
    <br /><br /><br />
    <table align="center"  cellpadding="0" border="0" cellspacing="0" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none; width: 93%;" >
        <tr><td colspan="5" style="height: 15px; width: 100%;" ><div class="RoundedCorner"><div align="center">
        <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
        <span class="style1">我 的 计　划</span></div></div></td></tr>
        <tr><td>
        <table cellpadding="0" border="0"  cellspacing="0" style="border-right: #5aae18 1px solid; border-top: #5aae18 1px solid; margin: 0px 1px 1px; border-left: #5aae18 1px solid; border-bottom: #5aae18 1px solid; width: 100%; padding-right: 1px; padding-left: 1px; padding-bottom: 1px; padding-top: 0px;" >
        
        <%
            if (doclist.Count != 0)
            {%>
        <tr><td colspan="5">&nbsp;</td></tr>
        <tr>
          <td><strong>主题</strong></td><td><strong>计划所有人</strong></td><td><strong>计划日期</strong></td><td><strong>类型</strong></td><td><strong>操作</strong></td>
        </tr>
        
        <%   foreach (COM.OA.Entity.timeorder docu in doclist)
             {
                 %>
                 <tr onmouseover = "this.style.backgroundColor = '#D5EEBB'" onmouseout = "this.style.backgroundColor = ''">
                 <td><a href="jh_plancontent.aspx?toid=<%=docu.to_id %>"><%=docu.to_title%></a></td>
                 
                 <%  int sendid = docu.to_u_id;
                     string sql3 = "u_id='{0}'";
                     sql3 = string.Format(sql3, sendid);
                     System.Collections.Generic.IList<COM.OA.Entity.users> userlist = COM.OA.BLL.usersBLL.Select(sql3, true, false);
                     if (userlist.Count == 1)
                     {
                         foreach (COM.OA.Entity.users u in userlist)
                         {
                             int emid = u.u_em_id;
                             string emname = "";
                             string sql4 = "em_id='{0}'";
                             sql4 = string.Format(sql4, emid);
                             System.Collections.Generic.IList<COM.OA.Entity.employee> emlist = COM.OA.BLL.employeeBLL.Select(sql4);
                             if (emlist.Count == 1)
                             {
                                 foreach (COM.OA.Entity.employee empl in emlist)
                                 {
                                     emname = empl.em_name;
                                 }
                             }
                             %>
                             <td style="height: 25px; width: 77px;"><%=emname%></td> 
                             <%
            }
        }
                  %>
                 <td><%=docu.to_sendtime%></td>
                 <td>
                     工作计划</td>  
                 <td><a href="jh_plandelete.aspx?toid=<%=docu.to_id %>">删除</a></td>
                 </tr>  
                 
                 <%     
            }
        }
        else
        {
            %><tr><td colspan="6" align="center" style="height: 51px"><strong>您还没有制定计划</strong></td></tr><%    
        }       
         %>
        
        </table>
        </td></tr>
        <tr><td colspan="4">
            <br />
            (总共<%=doclist.Count.ToString() %>条记录)</td></tr> 
    </table>

  </div>
    <div align="center"><img src="../images/sj/up.gif" width="17" height="12"><a href="javascript:history.go(-1)">返 回</a></div>
  
</body>
</html>
